home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Tool Chest / QuickDraw GX / QuickDraw GX Info / QuickDraw GX Interfaces / Interfaces & Libraries / printing libraries / JobFormatModeLibrary.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-30  |  3.4 KB  |  111 lines  |  [TEXT/MPS ]

  1. /* ------------------------------------------------------------------------------
  2.  
  3.     FILENAME
  4.         JobFormatModeLibrary.c
  5.         
  6.     DESCRIPTION
  7.         Handy job format mode functions.
  8.         
  9.     COPYRIGHT
  10.          © Apple Computer, Inc. 1992
  11.          All rights reserved. 
  12.     
  13. -------------------------------------------------------------------------------- */
  14.  
  15.  
  16. #include <PrintingManager.h>
  17.  
  18.  
  19.  
  20. /* Wrappers for JobFormatModeQuery() */
  21.  
  22.  
  23. /****************************************************************************************
  24.  
  25.                             GetJobFormatLineConstraint
  26.                             
  27.     function :
  28.                     Returns position constraint table for direct mode line drawing
  29.     parameters :
  30.                     the job and optional handle to hold the position constraint table
  31.                     
  32. ****************************************************************************************/
  33. gxPositionConstraintTableHdl GetJobFormatLineConstraint(gxJob theJob, gxPositionConstraintTableHdl hPositionConstraintTable) {
  34.     
  35.     GXJobFormatModeQuery(theJob, gxGetJobFormatLineConstraintQuery, NULL, &hPositionConstraintTable);
  36.     
  37.     return hPositionConstraintTable;
  38. }
  39.  
  40.  
  41. /****************************************************************************************
  42.  
  43.                             GetJobFormatFonts
  44.                             
  45.     function :
  46.                     Returns font table for direct mode
  47.     parameters :
  48.                     the job and optional handle to hold the font table
  49.                     
  50. ****************************************************************************************/
  51. gxFontTableHdl GetJobFormatFonts(gxJob theJob, gxFontTableHdl hFontTable) {
  52.     
  53.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontsQuery, NULL, &hFontTable);
  54.     
  55.     return hFontTable;
  56. }
  57.  
  58.  
  59. /****************************************************************************************
  60.  
  61.                             GetJobFormatFontCommonStyles
  62.                             
  63.     function :
  64.                     Returns style name table for direct mode
  65.     parameters :
  66.                     the job and optional handle to hold the style name table
  67.                     
  68. ****************************************************************************************/
  69. gxStyleNameTableHdl GetJobFormatFontCommonStyles(gxJob theJob, gxFont theFont, gxStyleNameTableHdl hStyleTable) {
  70.     
  71.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontCommonStylesQuery, theFont, &hStyleTable);
  72.     
  73.     return hStyleTable;
  74. }
  75.  
  76.  
  77. /****************************************************************************************
  78.  
  79.                             GetJobFormatFontConstraint
  80.                             
  81.     function :
  82.                     Returns position constraint table for direct mode fonts
  83.     parameters :
  84.                     the job and optional handle to hold the position constraint table
  85.                     
  86. ****************************************************************************************/
  87. gxPositionConstraintTableHdl GetJobFormatFontConstraint(gxJob theJob, gxFont theFont, gxPositionConstraintTableHdl hPositionConstraintTable) {
  88.     
  89.     GXJobFormatModeQuery(theJob, gxGetJobFormatFontConstraintQuery, theFont, &hPositionConstraintTable);
  90.     
  91.     return hPositionConstraintTable;
  92. }
  93.  
  94.  
  95. /****************************************************************************************
  96.  
  97.                             SetStyleJobFormatCommonStyle
  98.                             
  99.     function :
  100.                     Returns the style with the additional font style information set
  101.     parameters :
  102.                     the job and a style with the font and size values set
  103.                     
  104. ****************************************************************************************/
  105. gxStyle SetStyleJobFormatCommonStyle(gxJob theJob, Str255 theStyleName, gxStyle theStyle) {
  106.     
  107.     GXJobFormatModeQuery(theJob, gxSetStyleJobFormatCommonStyleQuery, theStyleName, theStyle);
  108.     
  109.     return theStyle;
  110. }
  111.